   <?php echo $this->error; ?>
<?php if (count($this->pages)): ?>
<table class="table table-bordered" >
     <thead>        
         <tr> 
             <th><?php echo $this->translate('Название лекции')?></th> 
             <th><?php echo $this->translate('Описание')?></th>
             <th><?php echo $this->translate('Рейтинг')?></th>
             <th><?php echo $this->translate('Действия')?></th>
         </tr>
     </thead>
    <tbody>
    <?php foreach ($this->pages as $item):?>
    <tr>
        <td width="18%"><a href="/lectures/single/id/<?php echo $item['lecture_id'] ?>">
            <h4><?php echo $this->escape($item['title']) ?></a></h4></td>
        <td width="62%"><h5 class="nobold"><?php echo $this->escape($item['text']); ?></h5></td>
        <td>
            <center>
                <?php if($item['rank_count']) 
                    echo round($item['rank_value'] / $item['rank_count'], 1);
                    else echo $this->translate('Оценок нет');
                ?>
            </center>
        </td>
        <td>
            <a class="btn btn-info"
               style="width: 99px;" 
               href="/lectures/single/id/<?php 
                echo $item['lecture_id'] ?>"><?php echo $this->translate('Просмотреть')?></a><br>

           <a class="btn btn-warning" 
               style="margin-top: 5px; width: 100px;" 
               href ="
               <?php echo $this->url(array(
                'controller'=>'lectures',
                'action'=>'edit',
                'lid'=>$item['lecture_id'],
                )); ?>"><?php echo $this->translate('Редактировать')?></a><br>
       
            <a href="#myModal-<?php echo $item['lecture_id']; ?>" 
               role="button" class="btn btn-danger" 
               style="margin-top: 5px; width: 99px;" 
               data-toggle="modal"><?php echo $this->translate('Удалить')?></a>

            <div id="myModal-<?php echo $item['lecture_id']; ?>" class="modal hide fade" 
                 tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel"><?php echo $this->translate('Удалить эту лекцию?')?></h3>
            </div>
            <div class="modal-body">
            <p><?php echo $this->translate('Потом вы не сможете отменить это действие.')?></p>
            </div>
            <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">
                <?php echo $this->translate('Отмена')?></button>
            <a href="/lectures/del/id/<?php echo $item['lecture_id'] ?>" 
               class="btn btn-danger"><?php echo $this->translate('Удалить')?></a>
            </div>
            </div>
        </td>
    </tr>
<?php
    endforeach; ?>
    </tbody>
    </table>
    <br /><?php echo $this->paginationControl($this->pages, 'Sliding', 'index/pagination/page.php'); ?>
<?php else:
?>
    <p><?php echo $this->translate('В этом курсе еще нет лекций.')?></p>
<?php endif ?>